Skip to content

test(mobile): guard phone answer layout against phantom scroll#567

Merged
BigSimmo merged 1 commit into
mainfrom
claude/phone-blackout-fix-nuxnt3
Jul 13, 2026
Merged

test(mobile): guard phone answer layout against phantom scroll#567
BigSimmo merged 1 commit into
mainfrom
claude/phone-blackout-fix-nuxnt3

Conversation

@BigSimmo

Copy link
Copy Markdown
Owner

Summary

  • Follow-up to the merged phone answer-view fix (fix(mobile): remove half-screen black void below short phone answers #563). Adds Chromium regression coverage so the layout behavior can't silently regress. Test-only change — no product code touched.
  • Two tests added to tests/ui-smoke.spec.ts, reusing the existing mockDemoApi/answerOverride and dock-geometry helpers (no new infra):
    • short answer → the answer section is content-sized and top-aligned, with no phantom scroll into the near-black shell (#main-content scrollHeight === clientHeight);
    • long answer → stays scrollable and top-aligned, and the opaque composer input stays clear of the scroll viewport (anchored on the input, not the dock's blur scrim, which intentionally fades content above it).
  • I verified the short-answer test fails when the old viewport-height floor is reintroduced (scrollHeight − clientHeight jumps from 0 to ~25px), so it genuinely guards the fix rather than passing vacuously.

Verification

  • npm run typecheck and npm run lint (tests/ui-smoke.spec.ts) — pass.
  • npm run check:runtime (part of verify:ui) — pass.
  • Chromium: the two new tests pass, and I re-ran the whole tests/ui-smoke.spec.ts in Chromium → 68 passed. The only failures (4) are the pre-existing, unrelated privacy warnings and links are available before clinical input test (it navigates to /privacy and can't find its <h1> in this local dev environment); that test is untouched by this PR. CI runs the UI suite with the full setup.
    • Note: npm run verify:ui as-is needs PLAYWRIGHT_CHROMIUM_EXECUTABLE_PATH pointed at the pre-installed browser in this sandbox (the bundled Playwright expects a browser build that isn't downloaded here); CI has the matching browser.
  • Retrieval/answer-eval and readiness checks: N/A — no product, retrieval, answer-generation, or governance code changed.

Clinical Governance Preflight

N/A — test-only change. It does not touch ingestion, answer generation, search/ranking, source rendering, document access, privacy, production env, or clinical output.

Notes


Generated by Claude Code

Follow-up regression coverage for the merged phone answer-view fix (#563).
Adds two Chromium tests to tests/ui-smoke.spec.ts, reusing the existing
mockDemoApi/answerOverride and dock-geometry helpers:

- short answer stays content-sized and top-aligned with no phantom scroll
  into the near-black shell (main scrollHeight === clientHeight);
- long answer stays scrollable and top-aligned, with the opaque composer
  input clear of the scroll viewport.

Verified the short-answer test fails if the viewport-height floor is
reintroduced, so it genuinely guards the fix.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01A1ekcXQZVFVKKzdoVpjyVQ
@coderabbitai

coderabbitai Bot commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 7bbcb86a-c9a1-48ca-8e79-0a6e6ee860e5

📥 Commits

Reviewing files that changed from the base of the PR and between 2cb14fa and c42cf42.

📒 Files selected for processing (1)
  • tests/ui-smoke.spec.ts

📝 Walkthrough

Summary by CodeRabbit

  • Tests
    • Added UI smoke coverage for short and long phone answers.
    • Verified correct top alignment, scrolling behavior, and prevention of phantom or horizontal overflow.
    • Confirmed answer content remains clear of the composer input area.

Walkthrough

Added phone UI smoke tests covering answer-surface sizing and alignment for short answers, scrolling and composer clearance for long answers, and horizontal overflow in both cases.

Changes

Phone answer layout

Layer / File(s) Summary
Answer-surface layout regression tests
tests/ui-smoke.spec.ts
Adds short-answer assertions for content-sized, top-aligned rendering and long-answer assertions for overflow scrolling, top alignment, composer clearance, and horizontal overflow prevention.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

  • BigSimmo/Database#421: Updates the same smoke test file for related mobile scrolling and composer visibility behavior.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch claude/phone-blackout-fix-nuxnt3
✨ Simplify code
  • Create PR with simplified code
  • Commit simplified code in branch claude/phone-blackout-fix-nuxnt3

Comment @coderabbitai help to get the list of available commands.

@supabase

supabase Bot commented Jul 13, 2026

Copy link
Copy Markdown

This pull request has been ignored for the connected project sjrfecxgysukkwxsowpy because there are no changes detected in supabase directory. You can change this behaviour in Project Integrations Settings ↗︎.


Preview Branches by Supabase.
Learn more about Supabase Branching ↗︎.

@BigSimmo
BigSimmo marked this pull request as ready for review July 13, 2026 08:37
@BigSimmo
BigSimmo enabled auto-merge (squash) July 13, 2026 08:37
@BigSimmo
BigSimmo merged commit 0d9e7f8 into main Jul 13, 2026
13 of 15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants